<script charset="utf-8" src="/assets/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/assets/kindeditor/lang/zh_CN.js"></script>
<script>
    KindEditor.ready(function(K) {

        window.editor = K.create('#weixin_content', {
            width : '800px',
            minWidth : '380px',
            cssData : "body {font-size: 15px;}",
            height:'400px',
            items : [
                'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                'flash', 'media', 'table', 'hr', 'pagebreak',
                'anchor', 'link', 'unlink', '|', 'about'
            ],
            afterCreate : function() {
                this.sync();
            },
            uploadJson : '/admins/news/upload_json',
            fileManagerJson : '../asp/file_manager_json.asp',
            allowFileManager : true,
            afterBlur: function(){
                this.sync();
            }//同步KindEditor的值到textarea文本框
        });
    });
</script>
<table class="edit_table">
<%= form_for [:admins, @weixin], :html => { :class => "form-horizontal weixin" } do |f| %>
  <tr>
    <td>标题</td>
    <td><%= f.text_field :title,:class => "long_input" %></td>
  </tr>
  <tr>
    <td>正文</td>
    <td>
      <%= f.text_area :content %>
    </td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <%= f.submit'确认',:class => 'btn btn-primary',:onclick => "getKind();" %>
      <%= link_to '返回',admins_weixins_path,:class => 'btn btn-info' %>
    </td>
  </tr>
<% end %>
</table>
